<template>
	<div>
		<div class="app-container">
			<TopInfo />
			<Search :lookup="data.lookup" @investigate="inves" />
			<div>
				<el-button type="primary">{{ $t('public.export') }} Excel</el-button>
			</div>
		</div>
		<div class="app-container" v-loading="data.mtloading">
			<el-table :data="data.list" :header-cell-style="{ 'text-align': 'center' }"
				:cell-style="{ 'text-align': 'center' }" class="w-full">
				<el-table-column prop="machine_id" :label="$t('machine.cycle')" show-overflow-tooltip>
					<template #default="scope">
						{{ scope.row.machine_id || '--' }}
					</template>
				</el-table-column>
				<el-table-column prop="machine_id" :label="$t('machine.code')" show-overflow-tooltip />
				<el-table-column prop="machine_id" :label="$t('machine.name')" show-overflow-tooltip />
				<el-table-column prop="machine_id" :label="$t('machine.operationDur')" show-overflow-tooltip />
				<el-table-column prop="machine_id" :label="$t('machine.actualDur')" show-overflow-tooltip />
				<el-table-column prop="machine_id" :label="$t('machine.exceptions')" show-overflow-tooltip />
				<el-table-column :label="$t('public.operate')" show-overflow-tooltip />
			</el-table>
		</div>
	</div>
</template>

<script lang="ts" setup>
import { useI18n } from 'vue-i18n'
const { t: $t } = useI18n()
import TopInfo from '@/components/TopInfo/index.vue';
import Search from '@/components/Search/index.vue';
let data = reactive({
	mtloading: false, // 加载
	lookup: [ // 筛选栏
		{ title: $t('machine.id'), type: 'machine', value: '', key: 'm_id' },
		{ title: $t('machine.code'), type: 'input', value: '', key: 'machine_id' },
		{ title: $t('public.date'), type: 'time', value: '', key: 'time' },
	],
	list: [], // 列表信息
	operatin: {
		page: 1,
		pageNum: 15,
	},
	total: 0, // 总条数
})

// 查询回调
let inves = (e) => {
	console.log(e)
}

</script>
